<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="../../commons/taglibs.jsp"%>
<style>
.pf-row {
	margin-bottom: 5px;
}

.pf-row  label {
	display: inline-block;
	width: 30%;
	text-align: right;
}
</style>
<div class="modal fade" data-backdrop="static" id="pf-add-adv-item-modal">
    <div class="modal-dialog ">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"></button>
                <h3 id="pf-modal-title">添加</h3>
            </div>
            <div class="modal-body">
                <form id="pf-adv-item-save-form" action="/manage/adv/item/save" method="post" enctype="multipart/form-data">
                    <input type="hidden" class="form-control" placeholder="id" name="id" value="${advItemEntity.id}" id="id" />
                    <div class="pf-row">
                        <label> <span class="red">*</span> 广告位：
                        </label>
                        <!-- <select id="pf-select-adv"
                            class="form-control" style="display: inline-block; width: 150px"></select> -->
                        <select id="pf-select-adv-modal" class="form-control" style="display: inline-block; width: 30%" name="advId">
                        </select>
                    </div>
                    <div class="pf-row">
                        <label> <!-- <span class="red">*</span> --> 城市：
                        </label> <select id="pf-select-province" class="form-control" style="display: inline-block; width: 25%" name="provinceId">
                        </select> <span class="clear"> </span> <select id="pf-select-city" class="form-control" style="display: inline-block; width: 25%" name="cityId">
                        </select>
                    </div>
                    <div class="pf-row">
                        <label> <span class="red">*</span> 标题：
                        </label> <input type="text" class="form-control" style="display: inline-block; width: 50%" placeholder="标题" name="title" value="${advItemEntity.title}" />
                    </div>
                    <div class="pf-row">
                        <label> 链接：</label> <input type="text" class="form-control" style="display: inline-block; width: 50%" placeholder="链接" name="link" value="${advItemEntity.link}" />
                    </div>
                    <div class="pf-row">
                        <label> <span class="red">*</span> 图片：
                        </label> <img id="advItemPicImg" alt="" src="" width="100" height="100">
                        <button type="button" class="btn btn-primary" onclick="$('#advItemPicInput').trigger('click')">选择文件</button>
                        <input id="advItemPicInput" type="file" class="form-control" style="display: none; width: 50%" name="file" value=""> <label id="imgPrompt" class="red"></label>
                    </div>
                    <div class="pf-row">
                        <label>有效时间：</label> <input type="text" class="form-control" style="display: inline-block; width: 25%;" placeholder="有效的起始时间" id="pf-adv-item-valid-begin-time" name="startTime" />
                        <input type="text" class="form-control" style="display: inline-block; width: 25%;" placeholder="有效的结束时间" id="pf-adv-item-valid-end-time" name="endTime" /> 空表示"不限制"
                    </div>
                    <div class="pf-row">
                        <label> 描述：</label>
                        <textarea class="form-control" style="display: inline-block; width: 50%" placeholder="描述" name="description"></textarea>
                    </div>
                    <div class="pf-row">
                        <label><span class="red">*</span>排序：</label> <input type="text" class="form-control" style="display: inline-block; width: 25%" placeholder="排序" name="orderby"
                            value="${advItemEntity.orderby}" />
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" data-dismiss="modal" class="btn">关闭</button>
                <button type="button" class="btn btn-primary pf-submit" id="pf-submit-adv-item">提交</button>
            </div>
        </div>
    </div>
</div>
